package com.haruhi.mapper;

import com.haruhi.entity.FileDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FileDetailMapper {
    /**
     * 添加
     * @param detail
     * @return
     */
    Integer insert(FileDetail detail);

    /**
     * 条件获取
     * @param condition
     * @return
     */
    List<FileDetail> selectByCondition(FileDetail condition);

    Integer updateByCondition(@Param("detail") FileDetail detail,@Param("condition") FileDetail condition);

    int deleteByMD5(@Param("md5")String md5,@Param("enable") boolean enable);

    int deleteById(@Param("id")Integer id,@Param("enable") boolean enable);

}
